package com.top.mall.main.home

import android.app.Activity
import android.content.Intent
import android.graphics.Color
import com.blankj.utilcode.util.BarUtils
import com.module.lemlin.owner.OwnerViewModeActivity
import com.top.mall.R
import com.top.mall.jetpack.vm.CouponViewModel
import kotlinx.android.synthetic.main.activity_access.*
import kotlinx.android.synthetic.main.activity_message.*
import kotlinx.android.synthetic.main.activity_message.imageViewBack

class MessageActivity : OwnerViewModeActivity<CouponViewModel>() {

    companion object {
        fun open(activity: Activity) {
            val intent = Intent(activity, MessageActivity::class.java)
            activity.startActivity(intent)
        }
    }


    override fun viewModel(): CouponViewModel {
        return createViewModel()
    }

    override val layoutResId: Int
        get() = R.layout.activity_message

    override fun stateBar(): StatusBar {
        return StatusBar(color = R.color.colorWhite,view = flMessageBar)
    }

    override fun initView() {

        imageViewBack.setOnClickListener { finish() }
        tvMessageOrder.setOnClickListener {
            MessageDetailsActivity.open("订单消息")
        }
        tvMessageDaohuo.setOnClickListener {
            MessageDetailsActivity.open("到货消息")
        }
        tvMessageSales.setOnClickListener {
            MessageDetailsActivity.open("促销活动")
        }
        tvMessageSystem.setOnClickListener {
            MessageDetailsActivity.open("系统消息")
        }
    }

    override fun initData() {

    }

}